<template>
	<div>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-icon mui-icon-left-nav" @click="goBack"></a>
			<h1 class="mui-title">新闻资讯</h1>
		</header>	
		<div class="mui-content newsDetail">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					{{newsTitle}}
					<!--幸福-->
					<p class="newsDateTime">{{newsTime}}</p>
					<!--<p class='mui-ellipsis'></p>-->
				</li>
			</ul>
			<div class="mui-table-view newsContent" v-html="html">
			</div>
		</div>
	</div>
</template>
<script>	
	import {
		getNewsDetail
	} from '@/service/getData';
	export default{
		data(){
			return {
				newsTitle:"",
				newsTime:"",
				html: null
			}
		},
		created(){
			this.newsId = this.$route.params.newsId;
			let self = this;
			getNewsDetail({
				"newsid": this.newsId
			}).then((res) => {
				self.newsTitle = res.data.Title;
				self.newsTime = res.data.Date;
				self.html = res.data.Content;
			})
		}
	}
</script>
<style>
</style>